/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-16
 */

class Animal {
    String name;
    int age;
    public void barks(){
        System.out.println(name + "吃饭");
    }
    Animal() {
        this.name = "aaa";
    }
    Animal(String name){
        this.name = name;
    }

}

class Dog extends Animal {
    boolean smart;
    Dog(){
        //super("kk");
    }
    Dog(String name) {
        super(name);
        //this();
    }
    public void action(){
        System.out.println(name + "摇尾巴");
    }

    public void func() {
        this.name = "hhh";
        super.name = "aaa";
    }
}
public class Test {
    public static void main(String[] args) {
        Dog a = new Dog();
        a.name = "张三";
        a.action();
        a.barks();
    }
}
